package com.vipheyue.bigcompany.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import com.github.paolorotolo.appintro.AppIntro2;
import com.vipheyue.bigcompany.R;
import com.vipheyue.bigcompany.utils.DataUtil;
import com.vipheyue.bigcompany.utils.SampleSlide;

public class BootStrapperActivity extends AppIntro2 {

    @Override
    public void init(Bundle savedInstanceState) {

        addSlide(SampleSlide.newInstance(R.layout.intro));
        addSlide(SampleSlide.newInstance(R.layout.intro2));
        addSlide(SampleSlide.newInstance(R.layout.intro3));
        addSlide(SampleSlide.newInstance(R.layout.intro4));
        setVibrate(true);
        setVibrateIntensity(30);
//        setFadeAnimation();
        setZoomAnimation();
//        setFlowAnimation();
//        setSlideOverAnimation();
//        setDepthAnimation();
    }
    private void loadMainActivity(){
        DataUtil.putSpBoolean("isFirstUse",false,this);
        Intent intent = new Intent(this, MainActivity.class);
        startActivity(intent);
    }

    @Override
    public void onDonePressed() {
        loadMainActivity();
    }

    public void customStarted(View v){//最后一个界面中的按钮 用户自定义
        loadMainActivity();
    }

}